package com.deer.wms.ware.task.model.SO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

/**
 * @author guo
 */
@Getter
@Setter
@Table(name = "so_detail")
public class SoDetail {
    /**
     * 主键
     */
    @Id
    @TableId(type = IdType.AUTO)
    @Column(name = "so_detail_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer soDetailId;

    /**
     * 单号
     */
    @Column(name = "bill_no")
    private String billNo;

    /**
     * 详情单号
     */
    @Column(name = "detail_no")
    private String detailNo;

    /**
     * 状态 0-新建
     */
    private Integer state;

    /**
     * 物料编码
     */
    @Column(name = "item_code")
    private String itemCode;

    /**
     * 物料名称
     */
    @Column(name = "item_name")
    private String itemName;

    /**
     * 物料名称
     */
    @Column(name = "spec")
    private String spec;

    /**
     * 物料名称
     */
    @Column(name = "model")
    private String model;

    /**
     * 物料名称
     */
    @Column(name = "img_url")
    private String imgUrl;

    /**
     * 包装详情ID
     */
    @Column(name = "pack_detail_id")
    private Integer packDetailId;

    /**
     * 包装描述
     */
    @Column(name = "pack_describe")
    private String packDescribe;


    private Double transRatio;
    /**
     * 订货数
     */
    @Column(name = "order_quantity")
    private Double orderQuantity;

    /**
     * 预分配数
     */
    @Column(name = "expect_allotted_quantity")
    private Double expectAllottedQuantity;

    /**
     * 分配数
     */
    @Column(name = "allotted_quantity")
    private Double allottedQuantity;

    private Integer allotPackDetailId;
    private String allotPackDescribe;
    private Double allotTransRatio;
    /**
     * 拣货数量
     */
    @Column(name = "pick_quantity")
    private Double pickQuantity;

    private Integer pickPackDetailId;
    private String pickPackDescribe;
    private Double pickTransRatio;
    /**
     * 发货数量
     */
    @Column(name = "delivery_quantity")
    private Double deliveryQuantity;
    private Double checkQuantity;



    private Integer deliveryPackDetailId;
    private String deliveryPackDescribe;
    private Double deliveryTransRatio;
    /**
     * 自定义1
     */
    @Column(name = "so_udf_ds1")
    private String soUdfDs1;

    /**
     * 自定义2
     */
    @Column(name = "so_udf_ds2")
    private String soUdfDs2;

    /**
     * 自定义3
     */
    @Column(name = "so_udf_ds3")
    private String soUdfDs3;

    /**
     * 备注
     */
    private String memo;


    private String mergeNo;
    private Double weight;
    private Double size;
    private Integer bomSplit;
    private String allotDetailNo;
    @TableField(exist = false)
    private Double number;
    @TableField(exist = false)
    @ApiModelProperty("库存余量")
    private Double marginQty;

    /**
     * 波次明细ID
     */
    private Integer waveDetailId;
    @TableField(exist = false)
    @ApiModelProperty("基本单位原始数量")
    private Double originQty;

    @ApiModelProperty("基本待检验数量")
    @TableField(exist = false)
    private Double qcQty;

}